<template>
  <UserLayout :active-index="activeIndex" :active-menu="activeMenu">
    <div class="system-messages-content">
      <!-- 页面标题 -->
      <div class="page-header">
        <h2>系统消息</h2>
        <el-button @click="goBack" icon="ArrowLeft">返回消息中心</el-button>
      </div>

      <!-- 系统消息区域 -->
      <div class="messages-area">
        <!-- 系统消息组件 -->
        <SystemMessageList />
      </div>
    </div>
  </UserLayout>
</template>

<script setup>
import { ref } from 'vue'
import { useRouter } from 'vue-router'
import UserLayout from '@/components/layout/UserLayout.vue'
import { ArrowLeft } from '@element-plus/icons-vue'
import SystemMessageList from '@/components/message/SystemMessageList.vue'

const router = useRouter()
const activeMenu = ref('messages')
const activeIndex = ref('4')

// 系统消息功能已移至SystemMessageList组件

// 返回消息中心
const goBack = () => {
  router.push('/message')
}

// 所有系统消息功能已移至SystemMessageList组件中实现
</script>

<style scoped>
.system-messages-content {
  padding: 20px;
  height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.page-header h2 {
  color: white;
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.page-header .el-button {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  backdrop-filter: blur(10px);
}

.page-header .el-button:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
}

.messages-area {
  flex: 1;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
</style>
